/**
 * 统一返回结果处理
 */
package org.longteng.core.base;

/**
 * 统一返回结果处理
 * @author Hymn
 *
 */
public enum ResultCode implements IErrorCode {
	SUCCESS(200, "成功"),
    FAILED(500, "服务器异常"),
    VALIDATE_FAILED(5000, "输入参数不完整"),
    UNAUTHORIZED(401, "token 验证失败"),
    FORBIDDEN(403, "没有相关权限");
	
    private long code;
    private String message;

    private ResultCode(long code, String message) {
        this.code = code;
        this.message = message;
    }

	/* (non-Javadoc)
	 * @see easyapp.weixin.utils.IErrorCode#getCode()
	 */
	@Override
	public long getCode() {
		return code;
	}

	/* (non-Javadoc)
	 * @see easyapp.weixin.utils.IErrorCode#getMessage()
	 */
	@Override
	public String getMessage() {
		return message;
	}

}
